﻿using EntityModel;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace 党务监管系统.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class peopleController : ControllerBase
    {
        private readonly PwsDbContext _db;
        public peopleController(PwsDbContext db)
        {
            _db = db;
        }
        [HttpGet]
        public Result Get()
        {
            Result result = new Result();
            result.Data = _db.people.ToList();
            return result;
        }
       

    }
}
